<div class="row justify-content-center">
    <div class="col-8">
        <form name="editForm" role="form" novalidate (ngSubmit)="save()" #editForm="ngForm">
            <h2 id="jhi-user-info-heading" jhiTranslate="husenApp.userInfo.home.createOrEditLabel">Create or edit a User Info</h2>
            <div>
                <jhi-alert-error></jhi-alert-error>
                <div class="form-group" [hidden]="!userInfo.id">
                    <label for="id" jhiTranslate="global.field.id">ID</label>
                    <input type="text" class="form-control" id="id" name="id"
                        [(ngModel)]="userInfo.id" readonly />
                </div>
                <div class="form-group">
                    <label class="form-control-label" jhiTranslate="husenApp.userInfo.vipLevelName" for="field_vipLevelName">Vip Level Name</label>
                    <input type="text" class="form-control" name="vipLevelName" id="field_vipLevelName"
                        [(ngModel)]="userInfo.vipLevelName" />
                </div>
                <div class="form-group">
                    <label class="form-control-label" jhiTranslate="husenApp.userInfo.vipState" for="field_vipState">Vip State</label>
                    <input type="number" class="form-control" name="vipState" id="field_vipState"
                        [(ngModel)]="userInfo.vipState" />
                </div>
                <div class="form-group">
                    <label class="form-control-label" jhiTranslate="husenApp.userInfo.vipSale" for="field_vipSale">Vip Sale</label>
                    <input type="number" class="form-control" name="vipSale" id="field_vipSale"
                        [(ngModel)]="userInfo.vipSale" />
                </div>
                <div class="form-group">
                    <label class="form-control-label" jhiTranslate="husenApp.userInfo.vipTime" for="field_vipTime">Vip Time</label>
                    <div class="d-flex">
                        <input id="field_vipTime" type="datetime-local" class="form-control" name="vipTime" [(ngModel)]="vipTime"
                        />
                    </div>
                </div>
                <div class="form-group">
                    <label class="form-control-label" jhiTranslate="husenApp.userInfo.conSume" for="field_conSume">Con Sume</label>
                    <input type="number" class="form-control" name="conSume" id="field_conSume"
                        [(ngModel)]="userInfo.conSume" />
                </div>

                <div class="form-group">
                    <label class="form-control-label" jhiTranslate="husenApp.userInfo.user" for="field_user">User</label>
                    <select class="form-control" id="field_user" name="user" [(ngModel)]="userInfo.userId" >
                        <option [ngValue]="null"></option>
                        <option [ngValue]="userOption.id" *ngFor="let userOption of users; trackBy: trackUserById">{{userOption.id}}</option>
                    </select>
                </div>
            </div>
            <div>
                <button type="button" id="cancel-save" class="btn btn-secondary"  (click)="previousState()">
                    <fa-icon [icon]="'ban'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.cancel">Cancel</span>
                </button>
                <button type="submit" id="save-entity" [disabled]="editForm.form.invalid || isSaving" class="btn btn-primary">
                    <fa-icon [icon]="'save'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.save">Save</span>
                </button>
            </div>
        </form>
    </div>
</div>
